Filters

What Is It?

Often in surveys, there are questions or answer codes that are not applicable to a certain subset of respondents. Survey Shaper allows you to specify the qualification criteria via filters so that only those who satisfy the specified filter criteria will be presented with the question or answer code.

Tip: When creating a filter for a question or answer, you want to define the criteria of those you want to include in asking the question/answer. Those who do not meet the specified criteria will not be asked the question.

How Do I Use This?

Using Filters and Skips in Survey Shaper - Click here to view a short video demonstrating how to use Filters and Skips in Survey Shaper.

Question Filters

Filters can be applied at the overall question level via the Properties Pane. To create a question filter:

  1. Click on the question that you wish to apply the filter to in the Designer Pane and either:
    • Right-mouse click on the question to open the Quick Update Box, or
    • Navigate to the 05 Define Filter question property in the Properties Pane.

  2. Enter the filter criteria by typing directly in the box (remember to preface all question references with '@'), or by clicking on the Filter Builder button on the far right of the property box Using the Filter Builder.
  3. Save the survey. The filter description will now be visible in the Designer Pane to the right of the filtered question object.

Answer Code Filters

Filters can be applied to individual answer codes via the answer Properties Tab. To create a code filter:

  1. Click on the question that you wish to apply the filter to in the Designer Pane.
  2. In the Properties Pane, click on the Answers Tab.
  3. Click on the answer code that you what the filter to apply to.
  4. Enter the filter criteria by typing directly in the 04 Code Filter property box (remember to preface all question references with '@') , or by clicking on the Filter Builder button on the far right of the property box Using the Filter Builder.
  5. Repeat steps 3 and 4 for each answer code you want to apply filters to.
  6. Save the survey.

Using the Filter Builder

The Filter Builder is a useful tool to aid in the specification of filter criteria.

To use the Filter Builder for question filters:

  1. Click on the question that you wish to apply the filter to in the Designer Pane.
  2. Either:
    • Open the Quick Update Box and click on the button on the far right of the Define Filter property box; or
    • Click on the button on the far right of the Define Filter property box in the Properties Pane.

  3. In the Filter Builder dialogue box, select the filter driver question and drag and drop it into the Defined Filters workspace on the right. Alternatively, click on the filter driver question to view the answer codes and then drag and drop the individual answer code/s to the workspace.
  4. Edit the filter definition, by clicking on the line in the Defined Filter workspace. This will enable a series of drop-downs that can be used to tailor the filter definition. The drop-downs will differ according to the question type of the filter driver.
    • Single response question drop-downs:
    • Multi response question drop-downs:
    • To delete a filter, click on the trash can next to the filter line you wish to remove (you may need to click on the "drop codes here" section of the screen before the trash can will appear)

  5. If desired, you can edit the script manually by clicking on the Manually Edit Filter button and then typing the filter definition directly into the workspace. You can return to the previous screen by clicking the Enable Drag/Drop button.
  6. Click OK to complete the filter definition or Cancel to abort.

To use the Filter Builder for answer filters:

  1. Click on the question that you wish to apply the filter to in the Designer Pane.
  2. Click on the answers tab in the Properties Pane.
  3. Select the answer to which you wish to apply the filter.
  4. Click on the button on the far right of the Code Filter property box.

  5. In the Filter Builder dialogue box, select the filter driver question and drag and drop it into the Defined Filters workspace on the right. Alternatively, click on the filter driver question to view the answer codes and then drag and drop the individual answer code/s to the workspace.

  6. Edit the filter definition, by clicking on the line in the Defined Filter workspace. This will enable a series of drop-downs that can be used to tailor the filter definition. The drop-downs will differ according to the question type of the filter driver.
    • Single response question drop-downs:

    • Multi response question drop-downs:
    • To delete a filter, click on the trash can next to the filter line you wish to remove (you may need to click on the "drop codes here" section of the screen before the trash can will appear)

  7. If desired, you can edit the script manually by clicking on the Manually Edit Filter button and then typing the filter definition directly into the workspace. You can return to the previous screen by clicking the Enable Drag/Drop button.

  8. Click OK to complete the filter definition or Cancel to abort.

Things to Consider

The filter driver question needs to precede the filtered question. A filtered question cannot be placed on the same page as the filter driver for that question.

To test whether the filter is working, you will need to preview the entire survey (using the Preview Survey option from the Main Menu), to ensure that the filter driver question has been answered.

If you have a block of questions requiring the same filter criteria, you may wish to use a skip object to skip over the block of questions, as multiple filters may negatively impact the speed of the survey.

For complicated filters, use parentheses (round brackets) to ensure that the syntax is being evaluated in the order intended.

See also:

Boolean Basics

Data Structure Guide

Global Variables Guide